<template>
   <div id="app" class="content">       
    <cameras :datas="analyzes" />
   </div>
</template>
<script>
import cameras from "../components/cameras";
import { mapGetters, mapActions } from "vuex";

export default {
  data() {
    return {
    };
  },
  components: {
    cameras
  },
  computed: mapGetters(["analyzes"]),
  mounted() {
    console.info("ai_home mounted begin");
    this.getCameras()
      .then(() => {
        console.info("request camera success");
        console.info(analyzes);
      })
      .catch(error => {
        console.log("request token error: " + error);
      });
  },
  methods: {
    ...mapActions(["getCameras"])
  }
};
</script>